<%-- 
    Document   : login
    Created on : Sep 28, 2011, 3:02:49 PM
    Author     : orjohan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    if (session.getAttribute("user") != null) {
	response.sendRedirect("category");
    }
%>

<!DOCTYPE html>
<html>
    <head>
        <title>Kiviq</title>
        <link rel="stylesheet" href="res/style.css" type="text/css" />
	<script type="text/javascript" src="res/jquery-1.6.4.js"></script>
	<script type="text/javascript" src="res/requiredFields.js"></script>
    </head>
    <body>
        <div id="banner">kiviq</div>
        <div id="description">The smarter way to study</div>
        <div class="loginContainer">
            <div class="lrc"></div><div class="ulc"></div>
            <div class="login">
                <form id="prevent_post_form" method="post" action="login.do" style="margin-bottom:5px;">
                    <div><input type="hidden" name="action" value="login" /></div>
                    <table>
                        <tr>
			    <td>Username<span class="required_field_message">*</span></td>
			    <td>Password<span class="required_field_message">*</span></td>
			</tr>
                        <tr>
                            <td><input class="required_field" type="text" name="uName" /></td>
                            <td><input class="required_field" type="password" name="uPwd" /></td>
                        </tr>
                        <tr>
                            <td><input class="button" type="submit" value="Login" /></td>
                        </tr>
                    </table>
                </form>
                <span class="error">${sessionScope['msg']}</span>
                <% session.removeAttribute("msg");%>
                <div class="subtle">No account? Register <a href="register">here</a>.</div>
            </div>
        </div>
    </body>
</html>